$OpenBSD: patch-src_librustc_session_filesearch_rs,v 1.4 2017/02/15 12:52:35 landry Exp $
fallback to LOCALBASE as default sysroot.
--- src/librustc/session/filesearch.rs.orig	Mon Jul  4 20:04:09 2016
+++ src/librustc/session/filesearch.rs	Tue Jul  5 19:01:38 2016
@@ -161,7 +161,10 @@ pub fn get_or_default_sysroot() -> PathBuf {
 
     match canonicalize(env::current_exe().ok()) {
         Some(mut p) => { p.pop(); p.pop(); p }
-        None => bug!("can't determine value for sysroot")
+        None => match option_env!("LOCALBASE") {
+            Some(dir) => PathBuf::from(dir),
+            None => bug!("can't determine value for sysroot"),
+        }
     }
 }
 
